#引入module01.py 模块
from tkinter import *
import math
# from 路径 import * 所有的東西
from  mymodule.canvas_axis_helper  import *

class MyCircle:
    START = -5.0
    END =5.0 
    DELTA = 0.01

    X_Fix=40
    Y_Fix=40
    tk = NONE
    canvas = NONE
    def __init__(self):
        MyCircle.tk = Tk()
        MyCircle.canvas = Canvas(MyCircle.tk,width=CanvasAxisHelper.MAX_X,height=CanvasAxisHelper.MAX_Y,bd=0)
        MyCircle.canvas.pack()
      
    @classmethod
    def fx(cls,x):
        return math.cos(x)
    
    @classmethod
    def fy(cls,x):
        return math.sin(x)
    
    def draw_int(self):
        CanvasAxisHelper.draw_init(MyCircle.canvas)
        x = MyCircle.START
        while x < MyCircle.END:
            #print(x,f(x))
            CanvasAxisHelper.plot(MyCircle.canvas,MyCircle.fx(x),MyCircle.fy(x))
            x = x+ MyCircle.DELTA
            
        MyCircle.tk.mainloop()
        
myCircle= MyCircle()
myCircle.draw_int()


    